<?php defined('_JEXEC') or die;$type 		= $params->get('type',	0);$db = & JFactory::getDBO();$lang = JRequest::getVar('lang','');if($type==0){?><div class="bookkingroom"><link rel="stylesheet" href="templates/protostar/css/daterangepicker.css" />
    <script src="templates/protostar/js/date/jquery-ui.js"></script>
<?php if($lang=="vn"||$lang=="vi-VN"){?>
<script>
jQuery(function(){
	var language = document.getElementsByTagName("html")[0].getAttribute("lang");
	var contant = 24*60*60*1000;
	var datepickersOpt = {dateFormat:'d-mm-yy',minDate:0,autoclose:true}
	var datepickersOptout = {dateFormat:'d-mm-yy',minDate:1,autoclose:true}
	jQuery("#date-checkin").datepicker(jQuery.extend({
        onSelect: function() {
			jQuery( "#date-checkin" ).datepicker( "option", "closeText", "Close" );
            var minDate = jQuery(this).datepicker('getDate');
			var maxDate = jQuery("#date-checkout").datepicker('getDate');
			var monthstart = (minDate.getMonth() + 1);if(monthstart <= 9){monthstart = "0"+monthstart;}
			var dateStringst = minDate.getFullYear() +"-"+ monthstart +"-"+ minDate.getDate() ;
			var dstart = minDate.getTime();
			var dend = maxDate.getTime();
			var alldate = Math.round(Math.abs((dstart - dend)/(contant)));
			jQuery('#datestart-hidden').val(dateStringst);
			jQuery('#alldate-hidden').val(alldate);
            minDate.setDate(minDate.getDate()+1);
            jQuery("#date-checkout").datepicker("option", "minDate", minDate);
        }
    },datepickersOpt));
    jQuery("#date-checkout").datepicker(jQuery.extend({
        onSelect: function() {
			jQuery( "#date-checkout" ).datepicker( "option", "closeText", "Close" );
			var minDate = jQuery("#date-checkin").datepicker("getDate");
            var maxDate = jQuery(this).datepicker('getDate');
			var monthstart = (minDate.getMonth() + 1);if(monthstart <= 9){monthstart = "0"+monthstart;}
			var dateStringst = minDate.getFullYear() +"-"+ monthstart +"-"+ minDate.getDate() ;
			var dstart = minDate.getTime();
			var dend = maxDate.getTime();
			var alldate = Math.round(Math.abs((dstart - dend)/(contant)));
			if(dend<dstart){
				var datestarthere = jQuery(this).datepicker('getDate');
				datestarthere.setDate(datestarthere.getDate()-1);
				datestarthere = jQuery.datepicker.formatDate("d-mm-yy",datestarthere);
				jQuery('#date-checkin').val(datestarthere);
			}
			jQuery('#datestart-hidden').val(dateStringst);
			jQuery('#alldate-hidden').val(alldate);
        }
    },datepickersOptout));
});
</script>
<?php
}
else{
?>
<script>
jQuery(function(){
	var contant = 24*60*60*1000;
	var datepickersOpt = {dateFormat:'d MM yy',minDate:0,autoclose:true}
	var datepickersOptout = {dateFormat:'d MM yy',minDate:1,autoclose:true}
	jQuery("#date-checkin").datepicker(jQuery.extend({
        onSelect: function() {
			jQuery( "#date-checkin" ).datepicker( "option", "closeText", "Close" );
            var minDate = jQuery(this).datepicker('getDate');
			var maxDate = jQuery("#date-checkout").datepicker('getDate');
			var monthstart = (minDate.getMonth() + 1);if(monthstart <= 9){monthstart = "0"+monthstart;}
			var dateStringst = minDate.getFullYear() +"-"+ monthstart +"-"+ minDate.getDate() ;
			var dstart = minDate.getTime();
			var dend = maxDate.getTime();
			var alldate = Math.round(Math.abs((dstart - dend)/(contant)));
			jQuery('#datestart-hidden').val(dateStringst);
			jQuery('#alldate-hidden').val(alldate);
            minDate.setDate(minDate.getDate()+1);
            jQuery("#date-checkout").datepicker("option", "minDate", minDate);
        }
    },datepickersOpt));
    jQuery("#date-checkout").datepicker(jQuery.extend({
        onSelect: function() {
			jQuery( "#date-checkout" ).datepicker( "option", "closeText", "Close" );
			var minDate = jQuery("#date-checkin").datepicker("getDate");
            var maxDate = jQuery(this).datepicker('getDate');
			var monthstart = (minDate.getMonth() + 1);if(monthstart <= 9){monthstart = "0"+monthstart;}
			var dateStringst = minDate.getFullYear() +"-"+ monthstart +"-"+ minDate.getDate() ;
			var dstart = minDate.getTime();
			var dend = maxDate.getTime();
			var alldate = Math.round(Math.abs((dstart - dend)/(contant)));
			if(dend<dstart){
				var datestarthere = jQuery(this).datepicker('getDate');
				datestarthere.setDate(datestarthere.getDate()-1);
				datestarthere = jQuery.datepicker.formatDate("d MM yy",datestarthere);
				jQuery('#date-checkin').val(datestarthere);
			}
			jQuery('#datestart-hidden').val(dateStringst);
			jQuery('#alldate-hidden').val(alldate);
        }
    },datepickersOptout));
});
</script>
<?php
}
?>
<script type="text/javascript">
function frmSub(){var language = document.getElementsByTagName("html")[0].getAttribute("lang");var f=document.getElementById('searchforma');var no_adult=f.no_adult.value;var no_child = f.no_child.value;if(no_child==1){var childrenage="0";}else if(no_child==2){var childrenage="0,0";}else{var childrenage="";}
var datestart=document.getElementById('datestart-hidden').value;var alldate=document.getElementById('alldate-hidden').value;if(language=="en-gb"){ga('send', 'event', 'Booking Button', 'click', '/WPH/PC/EN');ga('send', 'pageview', '/WPH/PC/EN');}else{ga('send', 'event', 'Booking Button', 'click', '/WPH/PC/VN');ga('send', 'pageview', '/WPH/PC/VN');}
window.open("https://www.yourreservation.net/tb3/index.cfm?bf=HELSGNWP&arrivalDate="+datestart+"&adults="+no_adult+"&nights="+alldate+"&children="+no_child+"&childrenages="+childrenage);}</script><div class="calendar"><form id="searchforma" name="hotels" method="post" action="/hotels">
<span id="two-inputs">
<input id="date-checkin" class="r9-datepicker-input" size="20" value="" placeholder="<?php echo JText::_('Check-in');?>" readonly="readonly" >
<input id="date-checkout" class="r9-datepicker-input" size="20" value="" placeholder="<?php echo JText::_('Check-out');?>" readonly="readonly" >
<input id="datestart-hidden" type="hidden" />
<input id="alldate-hidden" type="hidden" />
</span>
<div class="selectnumber"><div class="numadult"><select id="no_adult" name="no_adult"><option value="0"><?php echo JText::_('Adults');?></option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div><div class="numchild"><select id="no_child" name="no_child" ><option value="0"><?php echo JText::_('Children');?></option><option value="0">0</option><option value="1">1</option><option value="2">2</option></select></div></div><div class="formsubmit"><input onclick="frmSub();" type="button" name="submit" class="submit" id="submit" value="<?php echo JText::_('Book Now');?>" /></div></form></div></div><?php }if($type==1){$sql="SELECT * from #__content where catid='19' and state=1 order by id desc limit 0,3";$db->setQuery($sql);$lists = $db->loadObjectList();$wordfind = 'view=article';$sqlmenu="SELECT * from #__menu where link like '%$wordfind%' and published=1";$db->setQuery($sqlmenu);$rowitemidmenus = $db->loadObjectList();?><div class="highlighthome"><div class="page_header"><h2><strong><a href="http://windsorplazahotel.com/offers#tabs-2"><?php echo JText::_('Dining Offers');?></a></strong></h2></div><div class="contenthighlight" id="highlighthome"><?php $k=0;$last = "";for($i=0;$i<count($lists);$i++){$Itemidmenu = "";for($m=0;$m<count($rowitemidmenus);$m++){$idarticle = $rowitemidmenus[$m]->link;$idarticle = explode('&id=',$idarticle);if($idarticle[1]==$item->id){$Itemidmenu = $rowitemidmenus[$m]->id;}}if($Itemidmenu!=""){$itemidneed = "&Itemid=".$Itemidmenu;}$textfull = $lists[$i]->introtext.$lists[$i]->fulltext;$intro = strip_tags($textfull);if(strlen($intro) > 140){$intro = substr($intro, 0, 140);$endintro = strrpos($intro,' ');$intro = substr($intro, 0, $endintro);}$imgpromotion = $lists[$i]->images;$imgpromotion = explode('":"',$imgpromotion);$imgpromotion = explode('","',$imgpromotion[1]);$imgpromotion = str_replace('\/','/', $imgpromotion[0]);if($i==count($lists)-1){$last = "last";}if($k==0 || $k%3==0){echo '<ul>';}?>
<li>
<div class="highlightitem <?php echo $last;?>">
<div class="contenthighlight">
<h4 class="titlehighlight">
<a class="readmorehighlight" href="index.php?option=com_content&view=article&id=<?php echo $lists[$i]->id?>&catid=<?php echo $lists[$i]->catid?>&Itemid=118"><?php echo $lists[$i]->title?>
<div style="font-size:13px;margin-top:10px;"><?php echo $lists[$i]->metakey;?></div></a>
</h4>
</div>
</div>
</li>
<?php $k++;if($k%3==0 || $k==$n){echo '</ul>';}}?>
</div></div><?php }if($type==2){$sql="SELECT * from #__content where catid='17' and state=1 order by ordering limit 0,2";$db->setQuery($sql);$lists = $db->loadObjectList();?><div class="roompromotions"><div class="page_header"><h2><strong><?php echo JText::_('Room Packages');?></strong></h2></div><div class="contentpromotions"><?php $last = "";for($i=0;$i<count($lists);$i++){$textfull = $lists[$i]->introtext.$lists[$i]->fulltext;$intro = strip_tags($textfull);if (strlen($intro) > 120){$intro = substr($intro, 0, 120);$endintro = strrpos($intro,' ');$intro = substr($intro, 0, $endintro);}$imgpromotion = $lists[$i]->images;$imgpromotion = explode('":"',$imgpromotion);$imgpromotion = explode('","',$imgpromotion[1]);$imgpromotion = str_replace('\/','/', $imgpromotion[0]);if($i==count($lists)-1){$last = "last";}?><div class="promotionitem <?php echo $last;?>"><div class="imgpromotion"><a href="index.php?option=com_content&view=article&id=<?php echo $lists[$i]->id?>&catid=<?php echo $lists[$i]->catid?>&Itemid=124"><img alt="<?php echo $lists[$i]->title?> | Windsor Plaza Hotel | Ho Chi Minh City (Saigon), Vietnam" title="<?php echo $lists[$i]->title?>" src="<?php echo $imgpromotion;?>" /></a><div class="item-overlay overlay-icon-pic" style="opacity: 1; display: none;"><span style="left: -66px;"></span></div></div><h4 class="titlepromotion"><?php echo $lists[$i]->title?></h4><div class="intropromotion"><?php echo $intro;?>...<a class="readmorepromotion" href="index.php?option=com_content&view=article&id=<?php echo $lists[$i]->id?>&catid=<?php echo $lists[$i]->catid?>&Itemid=124"><?php echo JText::_('View Offer');?></a></div></div><?php }?></div></div><?php }if($type==3){$sql="SELECT * from #__content where id='1' and state=1";$db->setQuery($sql);$lists = $db->loadObjectList();$imgwelcomehome = $lists[0]->images;$imgwelcomehome = explode('":"',$imgwelcomehome);$imgwelcomehome = explode('","',$imgwelcomehome[1]);$imgwelcomehome = str_replace('\/','/', $imgwelcomehome[0]);?><div class="welcomehome"><div class="imgwelcomehome"><a href="index.php?option=com_content&view=article&id=<?php echo $lists[0]->id?>:<?php echo $lists[0]->alias?>&Itemid=108"><img alt="<?php echo $lists[0]->title;?> | Windsor Plaza Hotel | Ho Chi Minh City (Saigon), Vietnam" title="<?php echo $lists[0]->title;?>" src="<?php echo $imgwelcomehome;?>" /></a></div><div class="contentwelcomehome"><div class="page_header"><h2><strong><?php echo $lists[0]->title;?></strong></h2></div><div class="introwelcomehome"><?php echo $lists[0]->introtext;?><a class="readmore" href="index.php?option=com_content&view=article&id=<?php echo $lists[0]->id?>:<?php echo $lists[0]->alias?>&Itemid=108"><?php echo JText::_('Read More');?></a></div></div></div><?php }if($type==4){?><div class="bottomleft_addr"><span><?php echo JText::_('BOTTOM LEFT ADDRESS');?></span><span><?php echo JText::_('BOTTOM LEFT ADDRESS1');?></span><span><?php echo JText::_('TEL');?>: <a class="tel" href="tel:+84838336688">+84 8 3833 6688</a></span><span><?php echo JText::_('FAX');?>: +84 8 3833 6888</span><span><?php echo JText::_('EMAIL');?>: <a href="mailto:services@windsorplazahotel.com">services@windsorplazahotel.com</a></span></div><?php }if($type==5){$sql="SELECT * from #__banners where catid='18' and state=1";$db->setQuery($sql);$lists = $db->loadObjectList();?><script>jQuery(function(){jQuery('#slidesinstagram').slidesjs({width:300,height:190});});</script><div id="slidesinstagram"><?php $k=0;for($i=0;$i<count($lists);$i++){$n = count($lists);$imgslideinstagram = $lists[$i]->params;$imgslideinstagram = explode('imageurl":"',$imgslideinstagram);$imgslideinstagram = explode('","',$imgslideinstagram[1]);$imgslideinstagram = str_replace('\/','/',$imgslideinstagram[0]);if($k==0 || $k%9==0){echo '<a target="_blank" href="http://instagram.com/windsorplazahotel"><ul>';}?><li><img alt="Windsor Plaza Hotel | Windsor Plaza Hotel | Ho Chi Minh City (Saigon), Vietnam" title="Windsor Plaza Hotel" class="imgstagram" src="<?php echo $imgslideinstagram; ?>"></li><?php $k++;if($k%9==0 || $k==$n){echo '</ul></a>';}}?></div><?php }if($type==6){?><div class="maplocation"><a href="#"><iframe width="292" height="200" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=18+An+D%C6%B0%C6%A1ng+V%C6%B0%C6%A1ng,+ph%C6%B0%E1%BB%9Dng+9,+Qu%E1%BA%ADn+5,+H%E1%BB%93+Ch%C3%AD+Minh,+Vi%E1%BB%87t+Nam&amp;aq=0&amp;oq=18+a&amp;sll=10.823099,106.629664&amp;sspn=1.626671,2.705383&amp;ie=UTF8&amp;hq=&amp;hnear=18+An+D%C6%B0%C6%A1ng+V%C6%B0%C6%A1ng,+ph%C6%B0%E1%BB%9Dng+9,+Qu%E1%BA%ADn+5,+H%E1%BB%93+Ch%C3%AD+Minh,+Vietnam&amp;t=m&amp;ll=10.756498,106.67304&amp;spn=0.017708,0.025063&amp;z=14&amp;output=embed"></iframe><div class="mapbottom" style="color:#bca474;"><?php echo JText::_("View location");?></div></a></div><?php }if($type==7){$query = 'SELECT note FROM #__modules WHERE id=102';$db->setQuery($query);$temmenu = $db->loadResult();$queryrooms = 'SELECT * FROM #__content WHERE catid='.$temmenu.' and state=1';$db->setQuery($queryrooms);$temmenurooms = $db->loadObjectList();$querycatroom = 'SELECT * FROM #__categories WHERE parent_id="'.$temmenu.'" and published=1';$db->setQuery($querycatroom);$temmenuquerycatroom = $db->loadObjectList();?><div class="roomsright"><ul><?php if(count($temmenurooms)>=1){for($j=0;$j<count($temmenurooms);$j++){$wordfindroot = $temmenurooms[$j]->id;$sqlmenuroot="SELECT * from #__menu where link like '%$wordfindroot%' and published=1";$db->setQuery($sqlmenuroot);$rowitemidmenusroot = $db->loadObjectList();$itemidneedroot = "&Itemid=".$rowitemidmenusroot[0]->id;?><li><a href="index.php?option=com_content&view=article&id=<?php echo $temmenurooms[$j]->id?>&catid=<?php echo $temmenurooms[$j]->catid?><?php echo $itemidneedroot?>"><?php echo $temmenurooms[$j]->title;?></a></li><?php }}if(count($temmenuquerycatroom)>=1){for($i=0;$i<count($temmenuquerycatroom);$i++){$queryrooms = "";$temmenurooms = "";$wordfind = $temmenuquerycatroom[$i]->id;$sqlmenu="SELECT * from #__menu where link like '%$wordfind%' and published=1";$db->setQuery($sqlmenu);$rowitemidmenus = $db->loadObjectList();$itemidneed = "&Itemid=".$rowitemidmenus[0]->id;$queryrooms = 'SELECT * FROM #__content WHERE catid='.$temmenuquerycatroom[$i]->id.' and state=1';$db->setQuery( $queryrooms );$temmenurooms = $db->loadObjectList();for($k=0;$k<count($temmenurooms);$k++){?><li><a href="index.php?option=com_content&view=article&id=<?php echo $temmenurooms[$k]->id?>&catid=<?php echo $temmenurooms[$k]->catid?><?php echo $itemidneed;?>"><?php echo $temmenurooms[$k]->title;?></a></li><?php }}}?></ul></div><?php }if($type==14){$query = 'SELECT note FROM #__modules WHERE id=125';$db->setQuery($query);$temmenu = $db->loadResult();$queryrooms = 'SELECT * FROM #__content WHERE catid='.$temmenu.' and state=1';$db->setQuery($queryrooms);$temmenurooms = $db->loadObjectList();$querycatroom = 'SELECT * FROM #__categories WHERE parent_id="'.$temmenu.'" and published=1';$db->setQuery($querycatroom);$temmenuquerycatroom = $db->loadObjectList();?><div class="roomsright"><ul><?php if(count($temmenurooms)>=1){for($j=0;$j<count($temmenurooms);$j++){$wordfindroot = $temmenurooms[$j]->id;$sqlmenuroot="SELECT * from #__menu where link like '%$wordfindroot%' and published=1";$db->setQuery($sqlmenuroot);$rowitemidmenusroot = $db->loadObjectList();$itemidneedroot = "&Itemid=".$rowitemidmenusroot[0]->id;?><li><a href="index.php?option=com_content&view=article&id=<?php echo $temmenurooms[$j]->id?>&catid=<?php echo $temmenurooms[$j]->catid?><?php echo $itemidneedroot?>"><?php echo $temmenurooms[$j]->title;?></a></li><?php }}if(count($temmenuquerycatroom)>=1){for($i=0;$i<count($temmenuquerycatroom);$i++){$queryrooms = "";$temmenurooms = "";$wordfind = $temmenuquerycatroom[$i]->id;$sqlmenu="SELECT * from #__menu where link like '%$wordfind%' and published=1";$db->setQuery($sqlmenu);$rowitemidmenus = $db->loadObjectList();$itemidneed = "&Itemid=".$rowitemidmenus[0]->id;$queryrooms = 'SELECT * FROM #__content WHERE catid='.$temmenuquerycatroom[$i]->id.' and state=1';$db->setQuery( $queryrooms );$temmenurooms = $db->loadObjectList();for($k=0;$k<count($temmenurooms);$k++){?><li><a href="index.php?option=com_content&view=article&id=<?php echo $temmenurooms[$k]->id?>&catid=<?php echo $temmenurooms[$k]->catid?><?php echo $itemidneed;?>"><?php echo $temmenurooms[$k]->title;?></a></li><?php }}}?></ul></div><?php }if($type==8){$query = 'SELECT note FROM #__modules WHERE id=103';$db->setQuery($query);$temmenu = $db->loadResult();$queryrooms = 'SELECT * FROM #__content WHERE catid='.$temmenu.' and state=1';$db->setQuery($queryrooms);$temmenurooms = $db->loadObjectList();$querycatroom = 'SELECT * FROM #__categories WHERE parent_id="'.$temmenu.'" and published=1';$db->setQuery($querycatroom);$temmenuquerycatroom = $db->loadObjectList();?><div class="roomsright"><ul><?php if(count($temmenurooms)>=1){for($j=0;$j<count($temmenurooms);$j++){$wordfindroot = $temmenurooms[$j]->id;$sqlmenuroot="SELECT * from #__menu where link like '%$wordfindroot%' and published=1";$db->setQuery($sqlmenuroot);$rowitemidmenusroot = $db->loadObjectList();$itemidneedroot = "&Itemid=".$rowitemidmenusroot[0]->id;?><li><a href="index.php?option=com_content&view=article&id=<?php echo $temmenurooms[$j]->id?>&catid=<?php echo $temmenurooms[$j]->catid?><?php echo $itemidneedroot?>"><?php echo $temmenurooms[$j]->title;?></a></li><?php }}if(count($temmenuquerycatroom)>=1){for($i=0;$i<count($temmenuquerycatroom);$i++){$queryrooms = "";$temmenurooms = "";$wordfind = $temmenuquerycatroom[$i]->id;$sqlmenu="SELECT * from #__menu where link like '%$wordfind%' and published=1";$db->setQuery($sqlmenu);$rowitemidmenus = $db->loadObjectList();$itemidneed = "&Itemid=".$rowitemidmenus[0]->id;$queryrooms = 'SELECT * FROM #__content WHERE catid='.$temmenuquerycatroom[$i]->id.' and state=1';$db->setQuery( $queryrooms );$temmenurooms = $db->loadObjectList();for($k=0;$k<count($temmenurooms);$k++){?><li><a href="index.php?option=com_content&view=article&id=<?php echo $temmenurooms[$k]->id?>&catid=<?php echo $temmenurooms[$k]->catid?><?php echo $itemidneed;?>"><?php echo $temmenurooms[$k]->title;?></a></li><?php }}}?></ul></div><?php }if($type==9){$query = 'SELECT note FROM #__modules WHERE id=120';$db->setQuery($query);$temmenu = $db->loadResult();$queryrooms = 'SELECT * FROM #__content WHERE catid='.$temmenu.' and state=1';$db->setQuery($queryrooms);$temmenurooms = $db->loadObjectList();$querycatroom = 'SELECT * FROM #__categories WHERE parent_id="'.$temmenu.'" and published=1';$db->setQuery($querycatroom);$temmenuquerycatroom = $db->loadObjectList();?><div class="roomsright"><ul><?php if(count($temmenurooms)>=1){for($j=0;$j<count($temmenurooms);$j++){$itemidneedroot = "&Itemid=113";?><li><a href="index.php?option=com_content&view=article&id=<?php echo $temmenurooms[$j]->id?>&catid=<?php echo $temmenurooms[$j]->catid?><?php echo $itemidneedroot?>"><?php echo $temmenurooms[$j]->title;?></a></li><?php }}if(count($temmenuquerycatroom)>=1){for($i=0;$i<count($temmenuquerycatroom);$i++){$queryrooms = "";$temmenurooms = "";$itemidneed = "&Itemid=113";$queryrooms = 'SELECT * FROM #__content WHERE catid='.$temmenuquerycatroom[$i]->id.' and state=1';$db->setQuery( $queryrooms );$temmenurooms = $db->loadObjectList();for($k=0;$k<count($temmenurooms);$k++){?><li><a href="index.php?option=com_content&view=article&id=<?php echo $temmenurooms[$k]->id?>&catid=<?php echo $temmenurooms[$k]->catid?><?php echo $itemidneed;?>"><?php echo $temmenurooms[$k]->title;?></a></li><?php }}}?></ul></div><?php }if($type==10){if($lang=="en"){$linkform = "http://windsorplazahotel.com/meetings-events-venue-finder";}else if($lang=="vn"){$linkform = "http://windsorplazahotel.com/vn/meetings-events-venue-finder";}else{$linkform = "http://windsorplazahotel.com/meetings-events-venue-finder";}?><script type="text/javascript">function sel_banquet(sel){document.getElementById('sel_venue').value=sel;document.getElementById("banquet").className = 'active';document.getElementById("buffet").className = "";document.getElementById("classroom").className = "";document.getElementById("cocktail").className = "";document.getElementById("hollow").className = "";document.getElementById("theatre").className = "";document.getElementById("ushape").className = "";}function sel_buffet(sel){document.getElementById('sel_venue').value=sel;document.getElementById("banquet").className = "";document.getElementById("buffet").className = 'active';document.getElementById("classroom").className = "";document.getElementById("cocktail").className = "";document.getElementById("hollow").className = "";document.getElementById("theatre").className = "";document.getElementById("ushape").className = "";}function sel_classroom(sel){document.getElementById('sel_venue').value=sel;document.getElementById("banquet").className = "";document.getElementById("buffet").className = "";document.getElementById("classroom").className = 'active';document.getElementById("cocktail").className = "";document.getElementById("hollow").className = "";document.getElementById("theatre").className = "";document.getElementById("ushape").className = "";}function sel_cocktail(sel){document.getElementById('sel_venue').value=sel;document.getElementById("banquet").className = "";document.getElementById("buffet").className = "";document.getElementById("classroom").className = "";document.getElementById("cocktail").className = 'active';document.getElementById("hollow").className = "";document.getElementById("theatre").className = "";document.getElementById("ushape").className = "";}function sel_hollow(sel){document.getElementById('sel_venue').value=sel;document.getElementById("banquet").className = "";document.getElementById("buffet").className = "";document.getElementById("classroom").className = "";document.getElementById("cocktail").className = "";document.getElementById("hollow").className = 'active';document.getElementById("theatre").className = "";document.getElementById("ushape").className = "";}function sel_theatre(sel){document.getElementById('sel_venue').value=sel;document.getElementById("banquet").className = "";document.getElementById("buffet").className = "";document.getElementById("classroom").className = "";document.getElementById("cocktail").className = "";document.getElementById("hollow").className = "";document.getElementById("theatre").className = 'active';document.getElementById("ushape").className = "";}function sel_ushape(sel){document.getElementById('sel_venue').value=sel;document.getElementById("banquet").className = "";document.getElementById("buffet").className = "";document.getElementById("classroom").className = "";document.getElementById("cocktail").className = "";document.getElementById("hollow").className = "";document.getElementById("theatre").className = "";document.getElementById("ushape").className = 'active';}function submitfindbtn(){var f=document.getElementById('formlinkvenuefind');var numberaa=document.getElementById('numberaa').value;var sel_venue=document.getElementById('sel_venue').value;if(numberaa==""){alert("<?php echo JText::_('Please enter axpected attendance!')?>");f.numberaa.focus();}else{f.submit();}}</script><?php $numberaa = $_GET['numberaa'];$sel_venue= $_GET['sel_venue'];$classbanquet="";$classbuffet="";$classclassroom="";$classcocktail="";$classhollow="";$classtheatre="";$classushape="";if($sel_venue=='Banquet' || $sel_venue=='Banquet'){$classbanquet = 'class="active"';}else if($sel_venue=='Buffet' || $sel_venue=='Buffet'){$classbuffet = 'class="active"';}else if($sel_venue=='Classroom' || $sel_venue=='Classroom'){$classclassroom = 'class="active"';}else if($sel_venue=='Cocktail Reception' || $sel_venue=='Cocktail Reception'){$classcocktail = 'class="active"';}else if($sel_venue=='Hollow Square' || $sel_venue=='Hollow Square'){$classhollow = 'class="active"';}else if($sel_venue=='Theatre' || $sel_venue=='Theatre'){$classtheatre = 'class="active"';}else if($sel_venue=='U-Shape' || $sel_venue=='U-Shape'){$classushape = 'class="active"';}?><div class="topmeetingevent"><h4><?php echo JText::_('Venue Finder');?></h4><div class="find"><form action="<?php echo $linkform;?>" id="formlinkvenuefind" name="formlinkvenuefind" class="formlinkvenuefind"><div class="textnumber"><span><?php echo JText::_('Axpected Attendance:')?></span><input type="text" class="numberaa" name="numberaa" id="numberaa" value="<?php echo $numberaa;?>" placeholder="0" /></div><div class="textnumber"><span><?php echo JText::_('Venue Options:');?></span><a <?php echo $classbanquet;?> id="banquet" onclick="sel_banquet('<?php echo JText::_('Banquet');?>');" href="javascript:void(0)"><?php echo JText::_('Banquet');?></a><a <?php echo $classbuffet;?> id="buffet" onclick="sel_buffet('<?php echo JText::_('Buffet');?>');" href="javascript:void(0)"><?php echo JText::_('Buffet');?></a><a <?php echo $classclassroom;?> id="classroom" onclick="sel_classroom('<?php echo JText::_('Classroom');?>');" href="javascript:void(0)"><?php echo JText::_('Classroom');?></a><a <?php echo $classcocktail;?> id="cocktail" onclick="sel_cocktail('<?php echo JText::_('Cocktail Reception');?>');" href="javascript:void(0)"><?php echo JText::_('Cocktail Reception');?></a><a <?php echo $classhollow;?> id="hollow" onclick="sel_hollow('<?php echo JText::_('Hollow Square');?>');" href="javascript:void(0)"><?php echo JText::_('Hollow Square');?></a><a <?php echo $classtheatre;?> id="theatre" onclick="sel_theatre('<?php echo JText::_('Theatre');?>');" href="javascript:void(0)"><?php echo JText::_('Theatre');?></a><a <?php echo $classushape;?> id="ushape" onclick="sel_ushape('<?php echo JText::_('U-Shape');?>');" href="javascript:void(0)"><?php echo JText::_('U-Shape');?></a><br /><br /><input type="button" onclick="submitfindbtn();" class="submitbtn" name="submitbtn" id="submitbtn" value="<?php echo JText::_('FIND YOUR VENUE');?>" /><input type="hidden" class="radiovenue" name="sel_venue" id="sel_venue" value="<?php echo $sel_venue;?>" /></div></form></div></div><?php }if($type==11){?>
	<script src="templates/protostar/js/jquery-ui.js"></script>
	<script type="text/javascript">
        jQuery(function() {
            var tabCounter = 2;
            var tabs = jQuery( "#tabs" ).tabs();
            tabs.bind( "keyup", function( event ) {
                if ( event.altKey && event.keyCode === jQuery.ui.keyCode.BACKSPACE ) {
                    var panelId = tabs.find( ".ui-tabs-active" ).remove().attr( "aria-controls" );
                    jQuery( "#" + panelId ).remove();
                    tabs.tabs( "refresh" );
                }
            });
        });
    </script>
    <div class="ui-tabs ui-widget ui-widget-content ui-corner-all pagenewslist" id="tabs">
        <ul role="tablist" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
            <li aria-selected="true" aria-controls="tabs-1" class="ui-state-default ui-corner-top">
                <div class="page_header catroom">
                    <h2><strong><a id="ui-id-1" class="ui-tabs-anchor" href="#tabs-1"><?php echo JText::_('Recent Post'); ?></a></strong></h2>
                </div>
            </li>
            <li aria-selected="true" aria-controls="tabs-2" class="ui-state-default ui-corner-top">
                <div class="page_header catroom">
                    <h2><strong><a id="ui-id-2" class="ui-tabs-anchor" href="#tabs-2"><?php echo JText::_('Year'); ?></a></strong></h2>
                </div>
            </li>
        </ul>
        <div class="ui-tabs-panel" id="tabs-1">
		<?php
			$keywordyearright = date(Y);
            $query = 'SELECT note FROM #__modules WHERE id=123';
            $db->setQuery($query);
            $temmenu = $db->loadResult();
            $queryrooms = "SELECT * FROM #__content WHERE catid=".$temmenu." and publish_up like '%$keywordyearright%' and state=1 order by publish_up desc";
            $db->setQuery($queryrooms);
            $temmenurooms = $db->loadObjectList();
            $querycatroom = 'SELECT * FROM #__categories WHERE parent_id="'.$temmenu.'" and published=1';
            $db->setQuery($querycatroom);
            $temmenuquerycatroom = $db->loadObjectList();
        ?>
            <div class="roomsright">
                <ul>
                <?php 
                if(count($temmenurooms)>=1){
                for($j=0;$j<count($temmenurooms);$j++){
                ?>
                    <li>
                    <a href="index.php?option=com_content&view=article&id=<?php echo $temmenurooms[$j]->id?>&catid=<?php echo $temmenurooms[$j]->catid?>&Itemid=109">
                    <?php echo $temmenurooms[$j]->title;?>
                    <i><?php $datepublishup = strtotime($temmenurooms[$j]->publish_up);echo date("F d, Y",$datepublishup);?></i>
                    </a>
                    </li>
                <?php 
                }}
                if(count($temmenuquerycatroom)>=1){
				for($i=0;$i<count($temmenuquerycatroom);$i++){
					$queryrooms = "";
					$temmenurooms = "";
					$queryrooms = "SELECT * FROM #__content WHERE catid=".$temmenuquerycatroom[$i]->id." and publish_up like '%$keywordyearright%' and state=1";
					$db->setQuery( $queryrooms );
					$temmenurooms = $db->loadObjectList();
					for($k=0;$k<count($temmenurooms);$k++){
			?>
                    <li>
                    <a href="index.php?option=com_content&view=article&id=<?php echo $temmenurooms[$k]->id?>&catid=<?php echo $temmenurooms[$k]->catid?>&Itemid=109">
                    <?php echo $temmenurooms[$k]->title;?>
                    <i><?php $datepublishup = strtotime($temmenurooms[$k]->publish_up);echo date("F d, Y",$datepublishup);?></i>
                    </a>
                    </li>
			<?php 
					}
				}}
                ?>
                </ul>
            </div>
        </div>
        <div class="ui-tabs-panel" id="tabs-2">
        	<div class="roomsright">
        <?php
		$wordfind = $_POST['yearnewsofinput'];
        if($lang=="en"){$linkform = "http://windsorplazahotel.com/news-year";}else if($lang=="vn"){$linkform = "http://windsorplazahotel.com/vn/tin-tuc-cua-nam";}else{$linkform = "http://windsorplazahotel.com/news-year";}?><script>function formyearnews(yearnewsinput){var f=document.getElementById('yearnews');document.getElementById('yearnewsofinput').value = yearnewsinput;f.submit();}</script>
        <form action="<?php echo $linkform;?>" method="post" id="yearnews" class="yearnews" name="yearnews" >
		<?php 
		$datenow = date('Y-d-m');
		$datenow = explode('-',$datenow);
		$datenow = $datenow[0];
		for($i=$datenow;$i>=2011;$i--){
			$nameclass="";
			if($wordfind==$i){$nameclass = "active";}
		?>
        	<button id="yearnewsof" name="yearnewsof" class="yearnewsof <?php echo $nameclass;?>" value="<?php echo $i;?>" onclick="formyearnews(<?php echo $i;?>);">
			<?php echo $i;?>
            </button>
		<?php }?>
            <input type="hidden" name="yearnewsofinput" id="yearnewsofinput" value="" />
        </form>
        	</div>
        </div>
    </div>
<?php 
}
if($type==12){}if($type==13){$sql="SELECT * from #__content where catid='48' and state=1 order by ordering asc limit 0,1";$db->setQuery($sql);$lists = $db->loadObjectList();?><div class="meetingpromotions"><div class="page_header"><h2><strong><?php echo JText::_('Meetings - events');?></strong></h2></div><div class="contentpromotions"><?php $last = "";for($i=0;$i<count($lists);$i++){$textfull = $lists[$i]->introtext.$lists[$i]->fulltext;$intro = strip_tags($textfull);if (strlen($intro) > 115){$intro = substr($intro, 0, 115);$endintro = strrpos($intro,' ');$intro = substr($intro, 0, $endintro);}$imgpromotion = $lists[$i]->images;$imgpromotion = explode('":"',$imgpromotion);$imgpromotion = explode('","',$imgpromotion[1]);$imgpromotion = str_replace('\/','/', $imgpromotion[0]);if($lang=="vn" || $lang=="vi-VN"){$imgpromotion = str_replace('.jpg','.jpg', $imgpromotion);}if($i==count($lists)-1){$last = "last";}?><div class="promotionitem <?php echo $last;?>"><div class="imgpromotion"><!--<a target="_blank" href="index.php?option=com_content&view=article&id=<?php echo $lists[$i]->id?>&catid=<?php echo $lists[$i]->catid?>&Itemid=141">--><a target="_blank" href="http://oktoberfestvietnam.com/<?php if($lang=="vn"||$lang=="vi-VN"){echo "vn";}else{echo "en";}?>"><img alt="<?php echo $lists[$i]->title?> | Windsor Plaza Hotel | Ho Chi Minh City (Saigon), Vietnam" title="<?php echo $lists[$i]->title?>" src="<?php echo $imgpromotion;?>" /></a><div class="item-overlay overlay-icon-pic" style="opacity: 1; display: none;"><span style="left: -66px;"></span></div></div><h4 class="titlepromotion"><?php echo $lists[$i]->title?></h4><div class="intropromotion"><?php echo $intro;?>...<!--<a target="_blank" class="readmorepromotion" href="index.php?option=com_content&view=article&id=<?php echo $lists[$i]->id?>&catid=<?php echo $lists[$i]->catid?>&Itemid=141">--><a target="_blank" class="readmorepromotion" href="http://oktoberfestvietnam.com/<?php if($lang=="vn"||$lang=="vi-VN"){echo "vn";}else{echo "en";}?>"><?php echo JText::_('Details');?></a></div></div><?php }?></div></div><?php 
}
if($type==15){
?>
<div class="newsletter"><?php echo JText::_('Subscribe to our email newsletter for interesting information and news, sent out every month.');?></div>
<?php
}
if($type==16){
?>
<script type="text/javascript">
jQuery(document).ready(function(){
	jQuery("#mod_pukkaBanners .accordion-content").hide();
	jQuery("#mod_pukkaBanners .selected .accordion-content").show();
	jQuery("#mod_pukkaBanners .itemPreviewTitle").click(function(){
		if(jQuery(this).parent().hasClass("selected")){
		jQuery(this).nextAll(".accordion-content").slideUp().parent().removeClass("selected");
		}else{
		jQuery("#mod_pukkaBanners .accordion-content").slideUp().parent().removeClass("selected");
		jQuery(this).nextAll(".accordion-content").slideDown().parent().addClass("selected");}
	});
});
</script>
<div id="mod_pukkaBanners" class="moduleOutput viewList">
	<link rel="stylesheet" href="templates/protostar/css/daterangepicker.css" /><script src="templates/protostar/js/date/jquery-ui.js"></script>
<?php if($lang=="vn"||$lang=="vi-VN"){?>
<script>
jQuery(function(){
	var contant = 24*60*60*1000;
	var datepickersOpt = {dateFormat:'d-mm-yy',minDate:0,autoclose:true}
	var datepickersOptout = {dateFormat:'d-mm-yy',minDate:1,autoclose:true}
	jQuery("#date-checkin").datepicker(jQuery.extend({
        onSelect: function() {
			jQuery( "#date-checkin" ).datepicker( "option", "closeText", "Close" );
            var minDate = jQuery(this).datepicker('getDate');
			var maxDate = jQuery("#date-checkout").datepicker('getDate');
			var monthstart = (minDate.getMonth() + 1);if(monthstart <= 9){monthstart = "0"+monthstart;}
			var dateStringst = minDate.getFullYear() +"-"+ monthstart +"-"+ minDate.getDate() ;
			var dstart = minDate.getTime();
			var dend = maxDate.getTime();
			var alldate = Math.round(Math.abs((dstart - dend)/(contant)));
			jQuery('#datestart-hidden').val(dateStringst);
			jQuery('#alldate-hidden').val(alldate);
            minDate.setDate(minDate.getDate()+1);
            jQuery("#date-checkout").datepicker("option", "minDate", minDate);
        }
    },datepickersOpt));
    jQuery("#date-checkout").datepicker(jQuery.extend({
        onSelect: function() {
			jQuery( "#date-checkout" ).datepicker( "option", "closeText", "Close" );
			var minDate = jQuery("#date-checkin").datepicker("getDate");
            var maxDate = jQuery(this).datepicker('getDate');
			var monthstart = (minDate.getMonth() + 1);if(monthstart <= 9){monthstart = "0"+monthstart;}
			var dateStringst = minDate.getFullYear() +"-"+ monthstart +"-"+ minDate.getDate() ;
			var dstart = minDate.getTime();
			var dend = maxDate.getTime();
			var alldate = Math.round(Math.abs((dstart - dend)/(contant)));
			if(dend<dstart){
				var datestarthere = jQuery(this).datepicker('getDate');
				datestarthere.setDate(datestarthere.getDate()-1);
				datestarthere = jQuery.datepicker.formatDate("d-mm-yy",datestarthere);
				jQuery('#date-checkin').val(datestarthere);
			}
			jQuery('#datestart-hidden').val(dateStringst);
			jQuery('#alldate-hidden').val(alldate);
        }
    },datepickersOptout));
});
</script>
<?php
}else{
?>
<script>
jQuery(function(){
	var contant = 24*60*60*1000;
	var datepickersOpt = {dateFormat:'d MM yy',minDate:0,autoclose:true}
	var datepickersOptout = {dateFormat:'d MM yy',minDate:1,autoclose:true}
	jQuery("#date-checkin").datepicker(jQuery.extend({
        onSelect: function() {
			jQuery( "#date-checkin" ).datepicker( "option", "closeText", "Close" );
            var minDate = jQuery(this).datepicker('getDate');
			var maxDate = jQuery("#date-checkout").datepicker('getDate');
			var monthstart = (minDate.getMonth() + 1);if(monthstart <= 9){monthstart = "0"+monthstart;}
			var dateStringst = minDate.getFullYear() +"-"+ monthstart +"-"+ minDate.getDate() ;
			var dstart = minDate.getTime();
			var dend = maxDate.getTime();
			var alldate = Math.round(Math.abs((dstart - dend)/(contant)));
			jQuery('#datestart-hidden').val(dateStringst);
			jQuery('#alldate-hidden').val(alldate);
            minDate.setDate(minDate.getDate()+1);
            jQuery("#date-checkout").datepicker("option", "minDate", minDate);
        }
    },datepickersOpt));
    jQuery("#date-checkout").datepicker(jQuery.extend({
        onSelect: function() {
			jQuery( "#date-checkout" ).datepicker( "option", "closeText", "Close" );
			var minDate = jQuery("#date-checkin").datepicker("getDate");
            var maxDate = jQuery(this).datepicker('getDate');
			var monthstart = (minDate.getMonth() + 1);if(monthstart <= 9){monthstart = "0"+monthstart;}
			var dateStringst = minDate.getFullYear() +"-"+ monthstart +"-"+ minDate.getDate() ;
			var dstart = minDate.getTime();
			var dend = maxDate.getTime();
			var alldate = Math.round(Math.abs((dstart - dend)/(contant)));
			if(dend<dstart){
				var datestarthere = jQuery(this).datepicker('getDate');
				datestarthere.setDate(datestarthere.getDate()-1);
				datestarthere = jQuery.datepicker.formatDate("d MM yy",datestarthere);
				jQuery('#date-checkin').val(datestarthere);
			}
			jQuery('#datestart-hidden').val(dateStringst);
			jQuery('#alldate-hidden').val(alldate);
        }
    },datepickersOptout));
});
</script>
<?php }?>
<script type="text/javascript">
function frmSub(){var language = document.getElementsByTagName("html")[0].getAttribute("lang");var f=document.getElementById('searchforma');var no_adult=f.no_adult.value;var no_child = f.no_child.value;if(no_child==1){var childrenage="0";}else if(no_child==2){var childrenage="0,0";}else{var childrenage="";}var datestart=document.getElementById('datestart-hidden').value;var alldate=document.getElementById('alldate-hidden').value;if(language=="en-gb"){ga('send', 'event', 'Booking Button', 'click', '/WPH/MOBILE/EN');ga('send', 'pageview', '/WPH/MOBILE/EN');}else{ga('send', 'event', 'Booking Button', 'click', '/WPH/MOBILE/VN');ga('send', 'pageview', '/WPH/MOBILE/VN');}window.open("https://www.yourreservation.net/tb3/mobile/index.cfm?bf=HELSGNWPM&arrivalDate="+datestart+"&adults="+no_adult+"&nights="+alldate+"&children="+no_child+"&childrenages="+childrenage);}
</script> 
	<div class="moduleBody">
    	<div class="itemPreview">
			<h3 class="itemPreviewTitle accordion-header booknow"><?php echo JText::_("Book Now"); ?></h3>
			<div style="display: none;" class="accordion-content">					
				<div class="description_content contentarticle">
                	<div class="bookkingroom"><div class="calendar"><form id="searchforma" name="hotels" method="post" action="/hotels"><span id="two-inputs">
<input id="date-checkin" class="r9-datepicker-input" size="20" value="" placeholder="<?php echo JText::_('Check-in');?>" readonly="readonly" onChange="checkdate()" >
<input id="date-checkout" class="r9-datepicker-input" size="20" value="" placeholder="<?php echo JText::_('Check-out');?>" readonly="readonly" onChange="checkdate()" >
<input id="datestart-hidden" type="hidden" />
<input id="alldate-hidden" type="hidden" />
</span><div class="selectnumber"><div class="numadult"><select id="no_adult" name="no_adult"><option value="0"><?php echo JText::_('Adults');?></option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div><div class="numchild"><select id="no_child" name="no_child" ><option value="0"><?php echo JText::_('Children');?></option><option value="0">0</option><option value="1">1</option><option value="2">2</option></select></div></div><div class="formsubmit"><input onclick="frmSub();" type="button" name="submit" class="submit" id="submit" value="<?php echo JText::_('Book Now');?>" /></div></form></div></div>
                </div>
			</div>
        </div>
    </div>
</div>
<?php
}
?>